<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<div class="data">
	<div class="top clearfix">
		<ul class="tab">
			<c:choose><c:when test="${!empty appMenu.menuId}">
			<li class="curr"><span><fmt:message key="appMenu.edit.title" />${appMenu.title}</span></li></c:when>
			<c:otherwise>
			<li class="curr"><span><fmt:message key="appMenu.add.title.${appMenu.type}" /></span></li>
			</c:otherwise>
			</c:choose>
		</ul>
	</div>
	<div class="modify">
		<div id="jFieldErrorDiv" class="warning_msg" style="display: none"></div>
		<form class="mainForm" name="appMenuForm" id="appMenuForm" commandName="appMenu" method="post" action="${ctxPath}/system/adminMenu.html" onsubmit="return validateAppMenu(this);">
		<input type="hidden" name="type" value="${appMenu.type}" />
		<input type="hidden" name="appMenuId" id="menuId" value="${appMenu.menuId}" />
		<input type="hidden" name="parentId" value="${appMenu.parent.menuId}" />
		
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="com_modi_table">
			<tr>
				<th width="70"><fmt:message key="appMenu.appMenu" /> (<span class="red">*</span>):</th>
				<td>
					<fmt:message key="appMenu.type.${appMenu.type}" />${appMenu.menuNamePath}
				</td>
			</tr>
			<tr>
				<th><StoreAdmin:label key="appMenu.menuName" /></th>
				<td><input type="text" id="menuName" name="menuName" value="${appMenu.menuName}" class="inputtxt" style="width:300px"/></td>
			</tr>
			<tr>
				<th><StoreAdmin:label key="appMenu.title" /></th>
				<td><input type="text" id="title" name="title" value="${appMenu.title}" class="inputtxt" style="width:300px"/></td>
			</tr>
			<tr>
				<th><StoreAdmin:label key="appMenu.url" /></th>
				<td>
					<c:choose>
						<c:when test="${appMenu.type == 0}">
							<textarea id="url" name="url" class="textareattxt" style="height:100px;width:500px">${appMenu.url}</textarea>
							<probiz:plugin_tip id="appmenu_url"><fmt:message key="appMenu.url.tip" /></probiz:plugin_tip>
						</c:when>
						<c:otherwise>
							<input type="text" id="url" name="url" value="${appMenu.url}" class="inputtxt" style="width:500px"/>
						</c:otherwise>
					</c:choose>
				</td>
			</tr>
		</table>
		</form>
	</div>
</div>
<v:javascript formName="appMenu" staticJavascript="false" />
<script type="text/javascript">
	//如果是三级目录，隐藏add按钮
	if(${appMenu.threeLevel}){
		disableIconBtn ("add");
	}else{
		enableIconBtn ("add");
	}
	
	document.forms["appMenuForm"].elements["menuName"].focus();
</script>
